<?php

/**
 * CCoreBaseFollowersLogger
 *
 * @author Usenko Timur <usenko.timur@gmail.com>
 * @package base
 */

CCore::Using('base.followers.interface');

/**
 * @package base
 */
class CCoreBaseFollowersLogger implements ICoreBaseFollowers
{
	#<editor-fold defaultstate="collapsed" desc="private">
	/**
	 * @var $oLogger
	 */
	private $_oLogger;
	#</editor-fold>
	
	/**
	 * @param ACoreLogger $oLogger
	 * @return CCoreBaseFollowersLogger
	 */
	public function __construct(ACoreLogger $oLogger)
	{
		CCore::CheckTypes(array('$oLogger'));

		$this->_oLogger = $oLogger;
	}

	/**
	 * @param string $sDesc
	 * @param int $iDescType
	 * @param string $nsPrefix = null
	 * @param array $aSecretValues = array()
	 * @return bool
	 */
	public function Write($sDesc, $iDescType, $nsPrefix = null, $aSecretValues = array())
	{
		CCore::CheckTypes(array('$sDesc', '$iDescType', '$nsPrefix', '$aSecretValues'));

		$nsPrefix = (null === $nsPrefix) ? '' : $nsPrefix.': ';
		$this->_oLogger->Write($nsPrefix.$sDesc, $aSecretValues);
	}

	/**
	 * @return bool
	 */
	public function Clear()
	{
		return $this->_oLogger->Clear();
	}
}